package org.example.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Auther: GongXl
 * @Date: 2021/3/26 14:22
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RespBean {
    private long code;
    private String message;
    private Object obj;
    /**
     * @Author GongXl
     * @Description 成功返回
     * @Date 2021/3/26 14:27
     * @Param [message]
     * @return org.example.pojo.RespBean
     **/
    public static RespBean success(String message){
        return new  RespBean(200,message,null);
    }
    /**
     * @Author GongXl
     * @Description 成功返回结果
     * @Date 2021/3/26 14:27
     * @Param [message, obj]
     * @return org.example.pojo.RespBean
     **/
    public static RespBean success(String message,Object obj){
        return new  RespBean(200,message,obj);
    }
    /**
     * @Author GongXl
     * @Description 失败返回
     * @Date 2021/3/26 16:19
     * @Param [message]
     * @return org.example.pojo.RespBean
     **/
    public static RespBean error(String message){
        return new  RespBean(500,message,null);
    }
}